package com.ruoyi.system.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.system.domain.YsyCamerasself;
import com.ruoyi.system.mapper.YsyCamerasselfMapper;
import com.ruoyi.system.service.IYsyCamerasselfService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * 自有监控点信息Service业务层处理
 * 
 * @author ruoyi
 * @date 2021-03-09
 */
@Service
public class YSYlCamerasselfServiceImpl implements IYsyCamerasselfService
{
    @Autowired
    private YsyCamerasselfMapper ysyCamerasselfMapper;

    /**
     * 查询自有监控点信息
     * 
     * @param id 自有监控点信息ID
     * @return 自有监控点信息
     */
    @Override
    public YsyCamerasself selectYsyCamerasselfById(Long id)
    {
        return ysyCamerasselfMapper.selectYsyCamerasselfById(id);
    }

    /**
     * 查询自有监控点信息列表
     * 
     * @param YsyCamerasself 自有监控点信息
     * @return 自有监控点信息
     */
    @Override
    public List<YsyCamerasself> selectYsyCamerasselfList(YsyCamerasself YsyCamerasself)
    {
        return ysyCamerasselfMapper.selectYsyCamerasselfList(YsyCamerasself);
    }

    /**
     * 新增自有监控点信息
     * 
     * @param YsyCamerasself 自有监控点信息
     * @return 结果
     */
    @Override
    public int insertYsyCamerasself(YsyCamerasself YsyCamerasself)
    {
        YsyCamerasself.setCreateTime(DateUtils.getNowDate());
        return ysyCamerasselfMapper.insertYsyCamerasself(YsyCamerasself);
    }

    /**
     * 修改自有监控点信息
     * 
     * @param YsyCamerasself 自有监控点信息
     * @return 结果
     */
    @Override
    public int updateYsyCamerasself(YsyCamerasself YsyCamerasself)
    {
        YsyCamerasself.setUpdateTime(DateUtils.getNowDate());
        return ysyCamerasselfMapper.updateYsyCamerasself(YsyCamerasself);
    }

    /**
     * 批量删除自有监控点信息
     * 
     * @param ids 需要删除的自有监控点信息ID
     * @return 结果
     */
    @Override
    public int deleteYsyCamerasselfByIds(Long[] ids)
    {
        return ysyCamerasselfMapper.deleteYsyCamerasselfByIds(ids);
    }

    /**
     * 删除自有监控点信息信息
     * 
     * @param id 自有监控点信息ID
     * @return 结果
     */
    @Override
    public int deleteYsyCamerasselfById(Long id)
    {
        return ysyCamerasselfMapper.deleteYsyCamerasselfById(id);
    }

    @Override
    public List<YsyCamerasself> selectAllCameraList() {
        return ysyCamerasselfMapper.selectAllCameraList();
    }
}
